package com.zheng1.envii.ui.screens

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.tooling.preview.Preview
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import com.zheng1.envii.MainViewModel
import com.zheng1.envii.ui.components.DeviceStatus
import com.zheng1.envii.ui.theme.EnvIITheme


//@OptIn(ExperimentalMaterial3Api::class)
//@Composable
//fun MainScreen(
//    modifier: Modifier = Modifier,
//    viewModel: MainViewModel
//) {
//    val TAG = "MainScreen"
//    val context = LocalContext.current
//    val deviceInfo = DeviceInfo(
//        name = "raspberry pi",
//        address = "192.168.1.1",
//        curretnDeviceData = DeviceData("12:00:00", "28.2", "55.2", "101.132"),
//        historyDeviceData = listOf(
//            DeviceData("12:00:00", "28.2", "55.2", "101.132"),
//            DeviceData("12:00:00", "28.2", "55.2", "101.132"),
//            DeviceData("12:00:00", "28.2", "55.2", "101.132"),
//        )
//    )
//
//}
